package com.neiquan.secondhand.po;

import com.neiquan.backstage.core.PO;
import com.neiquan.backstage.core.bsc.CRUD;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.security.KeyStore;
import java.util.Date;

/**
 * 商品表
 * chenjunnan;
 * 2016/7/21
 */
@Entity
@org.hibernate.annotations.Entity(selectBeforeUpdate = true, dynamicUpdate = true)
@Table(name = "sh_goods")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@CRUD
public class Goods extends PO {
    @Override
    public Serializable getId() {
        return null;
    }

    @Id
    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "uuid.hex")
    @Column(name = "id", unique = true, nullable = false)
    private String id;//主键
    
    @Column(name = "userid", length=200)
    private String userid;//用户ID

    @Column(name = "title", length=200) 
    private String title;//标题

    @Column(name = "price",  precision = 2) 
    private Double price;//价格
   
    @Column(name = "prime_price",  precision = 2) 
    private Double primePrice;//原价

    @Column(name = "unit_price",precision = 2)
    private Double unitPrice;//单价

    @Column(name = "first_pay",precision = 2)
    private Double firstPay;//首付

    @Column(name = "dic_province", length=200)
    private String dicProvince;//省

    @Column(name = "dic_city",length = 200)
    private Integer dicCity;//市
    
    @Column(name = "dic_area",length = 200)
    private Integer dicArea;//区
    
    @Column(name = "address",length = 500)
    private String address;//详细地址
    
    @Column(name = "goods_img_id",length = 500)
    private String  goodsImgId;//多张图片，“，”分割

    @Column(name = "dic_first_type",length = 200)
    private String dicFirstType;//商品一级分类，六大类

    @Column(name = "dic_second_type",length = 200)
    private String dicSecondType; //商品二级分类(跑车...)一居室、二居室....
    
    @Column(name = "dic_three_type",length = 200)
    private String dicThreeType; //商品三级分类(大众、本田....)
    
    @Column(name = "dic_four_type",length = 200)
    private String dicFourType; //商品四级分类(宝马X5...)
    
    @Column(name = "dic_house_type",length = 200)
    private String dicHouseType; //住宅类型()
    
    @Column(name = "dic_house_space",length = 200)
    private String dicHouseSpace; //房屋面积()
    
    @Column(name = "if_sale_today",length = 200)
    private Integer ifSaleToday; //今天特卖  0：否，1是
    
    @Column(name = "ifpublish")
    private  Integer ifpublish;//是否发布 0：否，1是

    @Column(name = "description",length = 200)
    private String description; //简介    

    @Column(name = "create_time")
    private  Long createTime;//创建时间
    
    @Column(name = "update_time")
    private  Long updateTime;//更新时间
    
    @Column(name = "flag")
    private  Integer flag;//是否删除 0：是，1：否

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Double getPrimePrice() {
		return primePrice;
	}

	public void setPrimePrice(Double primePrice) {
		this.primePrice = primePrice;
	}

	public Double getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(Double unitPrice) {
		this.unitPrice = unitPrice;
	}

	public Double getFirstPay() {
		return firstPay;
	}

	public void setFirstPay(Double firstPay) {
		this.firstPay = firstPay;
	}

	public String getDicProvince() {
		return dicProvince;
	}

	public void setDicProvince(String dicProvince) {
		this.dicProvince = dicProvince;
	}

	public Integer getDicCity() {
		return dicCity;
	}

	public void setDicCity(Integer dicCity) {
		this.dicCity = dicCity;
	}

	public Integer getDicArea() {
		return dicArea;
	}

	public void setDicArea(Integer dicArea) {
		this.dicArea = dicArea;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getGoodsImgId() {
		return goodsImgId;
	}

	public void setGoodsImgId(String goodsImgId) {
		this.goodsImgId = goodsImgId;
	}

	public String getDicFirstType() {
		return dicFirstType;
	}

	public void setDicFirstType(String dicFirstType) {
		this.dicFirstType = dicFirstType;
	}

	public String getDicSecondType() {
		return dicSecondType;
	}

	public void setDicSecondType(String dicSecondType) {
		this.dicSecondType = dicSecondType;
	}

	public String getDicThreeType() {
		return dicThreeType;
	}

	public void setDicThreeType(String dicThreeType) {
		this.dicThreeType = dicThreeType;
	}

	public String getDicFourType() {
		return dicFourType;
	}

	public void setDicFourType(String dicFourType) {
		this.dicFourType = dicFourType;
	}

	public String getDicHouseType() {
		return dicHouseType;
	}

	public void setDicHouseType(String dicHouseType) {
		this.dicHouseType = dicHouseType;
	}

	public String getDicHouseSpace() {
		return dicHouseSpace;
	}

	public void setDicHouseSpace(String dicHouseSpace) {
		this.dicHouseSpace = dicHouseSpace;
	}

	public Integer getIfSaleToday() {
		return ifSaleToday;
	}

	public void setIfSaleToday(Integer ifSaleToday) {
		this.ifSaleToday = ifSaleToday;
	}

	public Integer getIfpublish() {
		return ifpublish;
	}

	public void setIfpublish(Integer ifpublish) {
		this.ifpublish = ifpublish;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Long createTime) {
		this.createTime = createTime;
	}

	public Long getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Long updateTime) {
		this.updateTime = updateTime;
	}

	public Integer getFlag() {
		return flag;
	}

	public void setFlag(Integer flag) {
		this.flag = flag;
	}

	public void setId(String id) {
		this.id = id;
	}

    
    
   
}
